package com.h3c.nem.service;

import com.h3c.nem.dto.TbNewerTaskDTO;
import com.h3c.nem.entity.SdUploadFile;
import com.h3c.nem.entity.TbWorker;

import java.io.File;
import java.util.List;
import java.util.Map;

/**
 * Copyright (C), 2020-2020, h3c
 * FileName: ITbNewerTaskService
 *
 * @Author: l22886
 * @Date: 2022-01-24
 * Description: tb_newer_task service
 * Version: 1.0
 */
public interface ITbNewerTaskService {

    /**
     * @title: selectFuzzyByDto
     * @description: 模糊查询操作
     * @params: [ dto ]
     * @return: java.util.List
     * @createTime: 2022-01-24
     * @version: 1.0
     * @author: l22886
     */
    public List<TbNewerTaskDTO> selectFuzzyByDto(TbNewerTaskDTO dto);

    /**
     * @title: selectByDto
     * @description: 精确查询操作
     * @params: [ dto ]
     * @return: java.util.List
     * @createTime: 2022-01-24
     * @version: 1.0
     * @author: l22886
     */
    public List<TbNewerTaskDTO> selectByDto(TbNewerTaskDTO dto);

    /**
     * @title: insertDto
     * @description: 插入操作
     * @params: [ dto ]
     * @return: Integer
     * @createTime: 2022-01-24
     * @version: 1.0
     * @author: l22886
     */
    public String insertDto(TbNewerTaskDTO dto);

    /**
     * @title: updateDto
     * @description: 修改操作
     * @params: [ dto ]
     * @return: Integer
     * @createTime: 2022-01-24
     * @version: 1.0
     * @author: l22886
     */
    public String updateDto(TbNewerTaskDTO dto);

    /**
     * @title: deleteDto
     * @description: 删除操作
     * @params: [ dto ]
     * @return: Integer
     * @createTime: 2022-01-24
     * @version: 1.0
     * @author: l22886
     */
    public Integer deleteDto(TbNewerTaskDTO dto);

    String postTask(List<TbNewerTaskDTO> paramsDTO);

    /**
     * 给员工发布任务
     *
     * @param workerList 员工集合
     * @param taskIdList 指定小任务,可不填
     * @return existNum flow已存在的数量
     *          emailNum 成功发送邮件数量
     */
    Map<String, String> postTaskByWorkerId(List<TbWorker> workerList, List<TbNewerTaskDTO> taskIdList);

    List<SdUploadFile> getTaskFileList(String taskId);
}
